//
//  QWeiboAsyncApi.h
//  QWeiboSDK4iOSDemo
//
//  Created   on 11-1-18.
//   
//

#import <Foundation/Foundation.h>
#import "QWeiboSyncApi.h"


@interface QWeiboAsyncApi : NSObject {

}

- (NSURLConnection*) getInviteWithConsumerKey:(NSString *)aConsumerKey
                                consumerSecret:(NSString *)aConsumerSecret 
                                accessTokenKey:(NSString *)aAccessTokenKey 
                             accessTokenSecret:(NSString *)aAccessTokenSecret 
                                    resultType:(ResultType)aResultType 
                                      delegate:(id)aDelegate;

/**
 format 	返回数据的格式（json或xml）
 name 	用户帐户名（可选）
 fopenid 	用户openid（可选）
 
 name和fopenid至少选一个，若同时存在则以name值为主
 startindex 	起始位置（第一页填0，继续向下翻页：填【reqnum*（page-1）】）
 reqnum 	请求个数(1-30)
 install 	过滤安装应用好友（可选）
 
 0-不考虑该参数，1-获取已安装应用好友，2-获取未安装应用好友 
 */
- (NSURLConnection*) getFriendsWithConsumerKey:(NSString *)aConsumerKey
                               consumerSecret:(NSString *)aConsumerSecret 
                               accessTokenKey:(NSString *)aAccessTokenKey 
                            accessTokenSecret:(NSString *)aAccessTokenSecret 
                                   resultType:(ResultType)aResultType 
                                         name:(NSString *)name
                                   startindex:(int)startindex
                                       reqnum:(int)reqnum
                                      install:(int)install
                                     delegate:(id)aDelegate;



- (NSURLConnection*)getUserInfoWithConsumerKey:(NSString *)aConsumerKey
                                consumerSecret:(NSString *)aConsumerSecret 
                                accessTokenKey:(NSString *)aAccessTokenKey 
                             accessTokenSecret:(NSString *)aAccessTokenSecret 
                                    resultType:(ResultType)aResultType 
                                      delegate:(id)aDelegate;

/**
 flag 	标识。0－转播列表 1－点评列表 2－点评与转播列表
 rootid 	转发或回复的微博根结点id（源微博id）
 pageflag 	分页标识（0：第一页，1：向下翻页，2：向上翻页）
 pagetime 	本页起始时间（第一页：填0，向上翻页：填上一次请求返回的第一条记录时间，向下翻页：填上一次请求返回的最后一条记录时间）
 reqnum 	每次请求记录的条数（1-100条）
 twitterid 	翻页用，第1-100条填0，继续向下翻页，填上一次请求返回的最后一条记录id
 */
- (NSURLConnection*)getCommentsWithConsumerKey:(NSString *)aConsumerKey
                                consumerSecret:(NSString *)aConsumerSecret 
                                accessTokenKey:(NSString *)aAccessTokenKey 
                             accessTokenSecret:(NSString *)aAccessTokenSecret 
                                    resultType:(ResultType)aResultType
                                          flag:(int)flag
                                        rootid:(long long)rootid
                                      pageflag:(int)pageflag
                                      pagetime:(long long)pagetime
                                        reqnum:(int)reqnum
                                     twitterid:(long long)twitterid
                                      delegate:(id)aDelegate;
- (NSURLConnection*)   getWeiboWithConsumerKey:(NSString *)aConsumerKey
                                consumerSecret:(NSString *)aConsumerSecret 
                                accessTokenKey:(NSString *)aAccessTokenKey 
                             accessTokenSecret:(NSString *)aAccessTokenSecret 
                                    resultType:(ResultType)aResultType 
                                           idx:(long long)idx
                                      delegate:(id)aDelegate;





- (NSURLConnection*)postCommentWithConsumerKey:(NSString *)aConsumerKey
                                consumerSecret:(NSString *)aConsumerSecret 
                                accessTokenKey:(NSString *)aAccessTokenKey 
                             accessTokenSecret:(NSString *)aAccessTokenSecret 
                                    resultType:(ResultType)aResultType 
                                          reid:(long long)reid
                                       content:(NSString*)content
                                      delegate:(id)aDelegate;






- (NSURLConnection*)searchWeiboWithConsumerKey:(NSString *)aConsumerKey
                                consumerSecret:(NSString *)aConsumerSecret 
                                accessTokenKey:(NSString *)aAccessTokenKey 
                             accessTokenSecret:(NSString *)aAccessTokenSecret 
                                    resultType:(ResultType)aResultType 
                                       keyword:(NSString*)keyword
                                      delegate:(id)aDelegate;




- (NSURLConnection*)postFollowWithConsumerKey:(NSString *)aConsumerKey
                               consumerSecret:(NSString *)aConsumerSecret 
                               accessTokenKey:(NSString *)aAccessTokenKey 
                            accessTokenSecret:(NSString *)aAccessTokenSecret 
                                   resultType:(ResultType)aResultType 
                                         name:(NSString *)name
                                     delegate:(id)aDelegate;

- (NSURLConnection*)getFriendshipWithConsumerKey:(NSString *)aConsumerKey
                                  consumerSecret:(NSString *)aConsumerSecret 
                                  accessTokenKey:(NSString *)aAccessTokenKey 
                               accessTokenSecret:(NSString *)aAccessTokenSecret 
                                      resultType:(ResultType)aResultType 
                                            name:(NSString *)name
                                        delegate:(id)aDelegate;


- (NSURLConnection *)getHomeMsgWithConsumerKey:(NSString *)aConsumerKey
						 consumerSecret:(NSString *)aConsumerSecret 
						 accessTokenKey:(NSString *)aAccessTokenKey 
					  accessTokenSecret:(NSString *)aAccessTokenSecret 
							 resultType:(ResultType)aResultType 
							  pageFlage:(PageFlag)aPageFlag 
								nReqNum:(NSInteger)aReqNum 
							   delegate:(id)aDelegate;

- (NSURLConnection *)publishMsgWithConsumerKey:(NSString *)aConsumerKey 
						 consumerSecret:(NSString *)aConsumerSecret 
						 accessTokenKey:(NSString *)aAccessTokenKey 
					  accessTokenSecret:(NSString *)aAccessTokenSecret 
								content:(NSString *)aContent 
							  imageFile:(NSString *)aImageFile 
							 resultType:(ResultType)aResultType 
							   delegate:(id)aDelegate;

@end
